home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Demos / A.D. Software / OOFILE 1.3b4d6.sit / OOFILE 1.3b4d6 / MacCodeWarriorDemo1.3b4d6 / docs / samples / ooftst09.cpp < prev    next >
MacBinary  |  1997-03-18  |  3.9 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Mon Mar 17 20:06:34 1997, modified Mon Mar 17 20:06:34 1997, creator 'CWIE', type ASCII, 3208 bytes "ooftst09.cpp" , at 0xd08 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 6f 6f 66 74 73 74 | 30 39 2e 63 70 70 00 00 |..ooftst|09.cpp..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 0c 88 00 | 00 01 9a af 53 9b 1a af |........|....S...|
|00000060| 53 9b 1a 00 00 0a 00 00 | 00 00 00 00 00 00 00 00 |S.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4c c4 00 00 |........|....L...|
|00000080| 2f 2f 20 43 6f 70 79 72 | 69 67 68 74 20 31 39 39 |// Copyr|ight 199|
|00000090| 34 20 41 2e 44 2e 20 53 | 6f 66 74 77 61 72 65 2e |4 A.D. S|oftware.|
|000000a0| 20 41 6c 6c 20 52 69 67 | 68 74 73 20 52 65 73 65 | All Rig|hts Rese|
|000000b0| 72 76 65 64 0d 0d 2f 2f | 20 4f 4f 46 54 45 53 54 |rved..//| OOFTEST|
|000000c0| 39 0d 0d 2f 2f 20 74 68 | 69 73 20 73 61 6d 70 6c |9..// th|is sampl|
|000000d0| 65 20 64 65 6c 65 74 65 | 73 20 72 65 63 6f 72 64 |e delete|s record|
|000000e0| 73 20 69 6e 63 6c 75 64 | 69 6e 67 20 72 65 6c 61 |s includ|ing rela|
|000000f0| 74 65 64 20 64 61 74 61 | 0d 0d 2f 2f 20 53 69 6d |ted data|..// Sim|
|00000100| 70 6c 65 20 73 74 72 65 | 61 6d 20 49 2f 4f 20 69 |ple stre|am I/O i|
|00000110| 73 20 75 73 65 64 20 74 | 6f 20 69 6e 74 65 72 61 |s used t|o intera|
|00000120| 63 74 20 77 69 74 68 20 | 74 68 65 20 75 73 65 72 |ct with |the user|
|00000130| 2e 0d 23 69 6e 63 6c 75 | 64 65 20 22 6f 6f 66 69 |..#inclu|de "oofi|
|00000140| 6c 65 2e 68 22 0d 0d 0d | 23 69 6e 63 6c 75 64 65 |le.h"...|#include|
|00000150| 20 22 6f 6f 66 74 73 74 | 30 32 2e 68 22 0d 0d 2f | "ooftst|02.h"../|
|00000160| 2f 20 67 6c 6f 62 61 6c | 20 76 61 72 69 61 62 6c |/ global| variabl|
|00000170| 65 73 20 74 68 61 74 20 | 64 65 66 69 6e 65 20 74 |es that |define t|
|00000180| 68 65 20 64 61 74 61 62 | 61 73 65 20 75 73 69 6e |he datab|ase usin|
|00000190| 67 20 74 68 65 20 6f 6f | 66 74 73 74 30 32 20 63 |g the oo|ftst02 c|
|000001a0| 6c 61 73 73 65 73 0d 0d | 09 54 45 53 54 5f 43 4f |lasses..|.TEST_CO|
|000001b0| 4e 4e 45 43 54 20 20 20 | 20 74 68 65 44 42 3b 0d |NNECT | theDB;.|
|000001c0| 09 64 62 50 61 74 69 65 | 6e 74 73 20 20 20 20 20 |.dbPatie|nts |
|000001d0| 50 61 74 69 65 6e 74 73 | 3b 0d 09 64 62 56 69 73 |Patients|;..dbVis|
|000001e0| 69 74 73 09 56 69 73 69 | 74 73 3b 0d 09 64 62 52 |its.Visi|ts;..dbR|
|000001f0| 65 6c 61 74 69 6f 6e 73 | 68 69 70 20 50 61 74 69 |elations|hip Pati|
|00000200| 65 6e 74 56 69 73 69 74 | 73 28 50 61 74 69 65 6e |entVisit|s(Patien|
|00000210| 74 73 2e 56 69 73 69 74 | 73 2c 20 56 69 73 69 74 |ts.Visit|s, Visit|
|00000220| 73 2e 50 61 74 69 65 6e | 74 29 3b 0d 09 0d 0d 76 |s.Patien|t);....v|
|00000230| 6f 69 64 20 74 65 73 74 | 52 65 63 44 65 6c 65 74 |oid test|RecDelet|
|00000240| 65 73 28 29 3b 0d 0d 76 | 6f 69 64 20 74 65 73 74 |es();..v|oid test|
|00000250| 52 65 63 44 65 6c 65 74 | 65 73 28 29 0d 7b 0d 09 |RecDelet|es().{..|
|00000260| 50 61 74 69 65 6e 74 73 | 2e 73 74 61 72 74 28 29 |Patients|.start()|
|00000270| 3b 0d 09 63 6f 75 74 20 | 3c 3c 20 22 44 65 6c 65 |;..cout |<< "Dele|
|00000280| 74 69 6e 67 20 69 6e 64 | 69 76 69 64 75 61 6c 20 |ting ind|ividual |
|00000290| 72 65 63 6f 72 64 20 2d | 20 22 0d 09 09 3c 3c 20 |record -| "...<< |
|000002a0| 50 61 74 69 65 6e 74 73 | 2e 4c 61 73 74 4e 61 6d |Patients|.LastNam|
|000002b0| 65 20 3c 3c 20 22 2c 20 | 22 0d 09 09 3c 3c 20 50 |e << ", |"...<< P|
|000002c0| 61 74 69 65 6e 74 73 2e | 4f 74 68 65 72 6e 61 6d |atients.|Othernam|
|000002d0| 65 73 20 20 0d 09 09 3c | 3c 20 65 6e 64 6c 20 3c |es ...<|< endl <|
|000002e0| 3c 20 65 6e 64 6c 3b 09 | 0d 09 50 61 74 69 65 6e |< endl;.|..Patien|
|000002f0| 74 73 2e 64 65 6c 65 74 | 65 52 65 63 6f 72 64 28 |ts.delet|eRecord(|
|00000300| 29 3b 0d 09 0d 09 63 6f | 75 74 20 3c 3c 20 22 53 |);....co|ut << "S|
|00000310| 68 6f 75 6c 64 20 62 65 | 20 6f 6e 20 6e 65 78 74 |hould be| on next|
|00000320| 20 72 65 63 6f 72 64 20 | 61 66 74 65 72 20 64 65 | record |after de|
|00000330| 6c 65 74 65 2c 20 77 68 | 69 63 68 20 69 73 20 6e |lete, wh|ich is n|
|00000340| 6f 77 20 66 69 72 73 74 | 20 72 65 63 6f 72 64 20 |ow first| record |
|00000350| 69 6e 20 66 69 6c 65 20 | 2d 20 22 0d 09 09 3c 3c |in file |- "...<<|
|00000360| 20 50 61 74 69 65 6e 74 | 73 2e 4c 61 73 74 4e 61 | Patient|s.LastNa|
|00000370| 6d 65 20 3c 3c 20 22 2c | 20 22 0d 09 09 3c 3c 20 |me << ",| "...<< |
|00000380| 50 61 74 69 65 6e 74 73 | 2e 4f 74 68 65 72 6e 61 |Patients|.Otherna|
|00000390| 6d 65 73 20 20 0d 09 09 | 3c 3c 20 65 6e 64 6c 20 |mes ...|<< endl |
|000003a0| 3c 3c 20 65 6e 64 6c 3b | 09 0d 0d 09 50 61 74 69 |<< endl;|....Pati|
|000003b0| 65 6e 74 73 2e 6c 61 73 | 74 28 29 3b 0d 09 63 6f |ents.las|t();..co|
|000003c0| 75 74 20 3c 3c 20 22 47 | 6f 74 6f 20 6c 61 73 74 |ut << "G|oto last|
|000003d0| 20 72 65 63 6f 72 64 20 | 69 6e 20 66 69 6c 65 20 | record |in file |
|000003e0| 2d 20 22 0d 09 09 3c 3c | 20 50 61 74 69 65 6e 74 |- "...<<| Patient|
|000003f0| 73 2e 4c 61 73 74 4e 61 | 6d 65 20 3c 3c 20 22 2c |s.LastNa|me << ",|
|00000400| 20 22 20 0d 09 09 3c 3c | 20 50 61 74 69 65 6e 74 | " ...<<| Patient|
|00000410| 73 2e 4f 74 68 65 72 6e | 61 6d 65 73 20 20 0d 09 |s.Othern|ames ..|
|00000420| 09 3c 3c 20 65 6e 64 6c | 20 3c 3c 20 65 6e 64 6c |.<< endl| << endl|
|00000430| 3b 09 0d 0d 09 50 61 74 | 69 65 6e 74 73 2e 64 65 |;....Pat|ients.de|
|00000440| 6c 65 74 65 52 65 63 6f | 72 64 28 29 3b 0d 09 63 |leteReco|rd();..c|
|00000450| 6f 75 74 20 3c 3c 20 22 | 53 68 6f 75 6c 64 20 62 |out << "|Should b|
|00000460| 65 20 6f 6e 20 66 69 72 | 73 74 20 72 65 63 6f 72 |e on fir|st recor|
|00000470| 64 20 61 66 74 65 72 20 | 64 65 6c 65 74 69 6e 67 |d after |deleting|
|00000480| 20 6c 61 73 74 20 2d 20 | 22 20 0d 09 09 3c 3c 20 | last - |" ...<< |
|00000490| 50 61 74 69 65 6e 74 73 | 2e 4c 61 73 74 4e 61 6d |Patients|.LastNam|
|000004a0| 65 20 3c 3c 20 22 2c 20 | 22 20 0d 09 09 3c 3c 20 |e << ", |" ...<< |
|000004b0| 50 61 74 69 65 6e 74 73 | 2e 4f 74 68 65 72 6e 61 |Patients|.Otherna|
|000004c0| 6d 65 73 20 20 0d 09 09 | 3c 3c 20 65 6e 64 6c 20 |mes ...|<< endl |
|000004d0| 3c 3c 20 65 6e 64 6c 3b | 09 0d 0d 09 50 61 74 69 |<< endl;|....Pati|
|000004e0| 65 6e 74 73 2e 73 65 6c | 65 63 74 41 6c 6c 28 29 |ents.sel|ectAll()|
|000004f0| 3b 0d 09 63 6f 75 74 20 | 3c 3c 20 22 50 61 74 69 |;..cout |<< "Pati|
|00000500| 65 6e 74 73 20 20 2d 20 | 73 68 6f 75 6c 64 20 62 |ents - |should b|
|00000510| 65 20 32 20 72 65 63 73 | 22 20 3c 3c 20 65 6e 64 |e 2 recs|" << end|
|00000520| 6c 20 3c 3c 20 50 61 74 | 69 65 6e 74 73 20 3c 3c |l << Pat|ients <<|
|00000530| 20 65 6e 64 6c 20 3c 3c | 20 65 6e 64 6c 3b 0d 09 | endl <<| endl;..|
|00000540| 0d 7d 0d 0d 0d 69 6e 74 | 20 6d 61 69 6e 28 29 0d |.}...int| main().|
|00000550| 7b 0d 09 63 6f 75 74 20 | 3c 3c 20 22 4f 4f 46 49 |{..cout |<< "OOFI|
|00000560| 4c 45 20 56 61 6c 69 64 | 61 74 69 6f 6e 20 53 75 |LE Valid|ation Su|
|00000570| 69 74 65 20 2d 20 54 65 | 73 74 20 39 5c 6e 22 0d |ite - Te|st 9\n".|
|00000580| 09 09 20 3c 3c 20 22 53 | 69 6d 70 6c 65 20 74 65 |.. << "S|imple te|
|00000590| 73 74 20 74 6f 20 64 65 | 6d 6f 6e 73 74 72 61 74 |st to de|monstrat|
|000005a0| 65 20 64 65 6c 65 74 69 | 6e 67 20 72 65 63 6f 72 |e deleti|ng recor|
|000005b0| 64 73 22 20 3c 3c 20 65 | 6e 64 6c 0d 09 09 20 3c |ds" << e|ndl... <|
|000005c0| 3c 20 22 75 73 69 6e 67 | 20 74 68 65 20 64 61 74 |< "using| the dat|
|000005d0| 61 62 61 73 65 20 66 72 | 6f 6d 20 6f 6f 66 74 73 |abase fr|om oofts|
|000005e0| 74 30 32 22 20 3c 3c 20 | 65 6e 64 6c 3b 0d 09 09 |t02" << |endl;...|
|000005f0| 20 0d 09 23 69 66 64 65 | 66 20 54 45 53 54 49 4e | ..#ifde|f TESTIN|
|00000600| 47 5f 44 42 41 53 45 0d | 09 09 23 69 66 64 65 66 |G_DBASE.|..#ifdef|
|00000610| 20 5f 4d 61 63 69 6e 74 | 6f 73 68 0d 09 09 09 63 | _Macint|osh....c|
|00000620| 6f 6e 73 74 20 63 68 61 | 72 2a 20 6b 45 78 69 73 |onst cha|r* kExis|
|00000630| 74 73 4e 61 6d 65 20 3d | 20 20 22 3a 6f 6f 66 74 |tsName =| ":ooft|
|00000640| 73 74 30 39 3a 50 61 74 | 69 65 6e 74 73 2e 64 62 |st09:Pat|ients.db|
|00000650| 66 22 3b 0d 09 09 09 63 | 6f 6e 73 74 20 63 68 61 |f";....c|onst cha|
|00000660| 72 2a 20 6b 44 61 74 61 | 62 61 73 65 4e 61 6d 65 |r* kData|baseName|
|00000670| 20 3d 20 22 3a 6f 6f 66 | 74 73 74 30 39 3a 22 3b | = ":oof|tst09:";|
|00000680| 0d 09 09 23 65 6c 73 65 | 0d 09 09 09 63 6f 6e 73 |...#else|....cons|
|00000690| 74 20 63 68 61 72 2a 20 | 6b 45 78 69 73 74 73 4e |t char* |kExistsN|
|000006a0| 61 6d 65 20 3d 20 20 20 | 22 50 61 74 69 65 6e 74 |ame = |"Patient|
|000006b0| 73 2e 64 62 66 22 0d 09 | 09 09 63 6f 6e 73 74 20 |s.dbf"..|..const |
|000006c0| 63 68 61 72 2a 20 6b 44 | 61 74 61 62 61 73 65 4e |char* kD|atabaseN|
|000006d0| 61 6d 65 20 3d 20 22 22 | 3b 0d 09 09 23 65 6e 64 |ame = ""|;...#end|
|000006e0| 69 66 09 0d 0d 09 23 65 | 6c 73 65 0d 09 09 63 6f |if....#e|lse...co|
|000006f0| 6e 73 74 20 63 68 61 72 | 2a 20 6b 44 61 74 61 62 |nst char|* kDatab|
|00000700| 61 73 65 4e 61 6d 65 20 | 3d 20 22 6f 6f 66 74 73 |aseName |= "oofts|
|00000710| 74 30 39 2e 64 62 22 3b | 0d 09 09 63 6f 6e 73 74 |t09.db";|...const|
|00000720| 20 63 68 61 72 2a 20 6b | 45 78 69 73 74 73 4e 61 | char* k|ExistsNa|
|00000730| 6d 65 20 3d 20 6b 44 61 | 74 61 62 61 73 65 4e 61 |me = kDa|tabaseNa|
|00000740| 6d 65 3b 0d 09 23 65 6e | 64 69 66 0d 09 0d 09 69 |me;..#en|dif....i|
|00000750| 66 20 28 64 62 43 6f 6e | 6e 65 63 74 3a 3a 66 69 |f (dbCon|nect::fi|
|00000760| 6c 65 45 78 69 73 74 73 | 28 6b 45 78 69 73 74 73 |leExists|(kExists|
|00000770| 4e 61 6d 65 29 29 20 7b | 0d 09 09 74 68 65 44 42 |Name)) {|...theDB|
|00000780| 2e 6f 70 65 6e 43 6f 6e | 6e 65 63 74 69 6f 6e 28 |.openCon|nection(|
|00000790| 6b 44 61 74 61 62 61 73 | 65 4e 61 6d 65 29 3b 0d |kDatabas|eName);.|
|000007a0| 09 7d 0d 09 65 6c 73 65 | 20 7b 0d 09 09 74 68 65 |.}..else| {...the|
|000007b0| 44 42 2e 6e 65 77 43 6f | 6e 6e 65 63 74 69 6f 6e |DB.newCo|nnection|
|000007c0| 28 6b 44 61 74 61 62 61 | 73 65 4e 61 6d 65 29 3b |(kDataba|seName);|
|000007d0| 0d 09 7d 0d 0d 09 50 61 | 74 69 65 6e 74 73 2e 41 |..}...Pa|tients.A|
|000007e0| 64 64 54 65 73 74 44 61 | 74 61 28 29 3b 20 20 2f |ddTestDa|ta(); /|
|000007f0| 2f 20 61 6c 77 61 79 73 | 20 61 64 64 20 64 61 74 |/ always| add dat|
|00000800| 61 20 2d 20 66 69 6c 65 | 20 69 73 20 65 6d 70 74 |a - file| is empt|
|00000810| 79 20 66 72 6f 6d 20 6c | 61 73 74 20 72 75 6e 20 |y from l|ast run |
|00000820| 69 66 20 69 74 20 65 78 | 69 73 74 73 0d 0d 09 63 |if it ex|ists...c|
|00000830| 6f 75 74 20 3c 3c 20 22 | 45 6e 74 69 72 65 20 64 |out << "|Entire d|
|00000840| 61 74 61 62 61 73 65 20 | 62 65 66 6f 72 65 20 64 |atabase |before d|
|00000850| 65 6c 65 74 69 6f 6e 73 | 22 20 3c 3c 20 65 6e 64 |eletions|" << end|
|00000860| 6c 20 3c 3c 20 74 68 65 | 44 42 20 3c 3c 20 65 6e |l << the|DB << en|
|00000870| 64 6c 3b 0d 0d 09 64 62 | 56 69 65 77 20 73 6d 69 |dl;...db|View smi|
|00000880| 74 68 56 69 73 69 74 73 | 28 50 61 74 69 65 6e 74 |thVisits|(Patient|
|00000890| 73 2e 56 69 73 69 74 73 | 29 3b 20 0d 09 73 6d 69 |s.Visits|); ..smi|
|000008a0| 74 68 56 69 73 69 74 73 | 20 3c 3c 20 50 61 74 69 |thVisits| << Pati|
|000008b0| 65 6e 74 73 2e 56 69 73 | 69 74 73 2d 3e 56 69 73 |ents.Vis|its->Vis|
|000008c0| 69 74 44 61 74 65 20 3c | 3c 20 50 61 74 69 65 6e |itDate <|< Patien|
|000008d0| 74 73 2e 56 69 73 69 74 | 73 2d 3e 57 68 79 3b 20 |ts.Visit|s->Why; |
|000008e0| 0d 0d 09 50 61 74 69 65 | 6e 74 73 2e 73 65 61 72 |...Patie|nts.sear|
|000008f0| 63 68 28 50 61 74 69 65 | 6e 74 73 2e 4c 61 73 74 |ch(Patie|nts.Last|
|00000900| 4e 61 6d 65 3d 3d 22 53 | 6d 69 74 68 22 29 3b 0d |Name=="S|mith");.|
|00000910| 09 63 6f 75 74 20 3c 3c | 20 22 44 75 6d 70 69 6e |.cout <<| "Dumpin|
|00000920| 67 20 53 6d 69 74 68 20 | 61 6e 64 20 68 69 73 20 |g Smith |and his |
|00000930| 76 69 73 69 74 73 3a 20 | 22 20 3c 3c 20 65 6e 64 |visits: |" << end|
|00000940| 6c 20 0d 09 20 20 20 20 | 20 3c 3c 20 50 61 74 69 |l .. | << Pati|
|00000950| 65 6e 74 73 20 3c 3c 20 | 65 6e 64 6c 20 0d 09 09 |ents << |endl ...|
|00000960| 20 3c 3c 20 73 6d 69 74 | 68 56 69 73 69 74 73 20 | << smit|hVisits |
|00000970| 3c 3c 20 65 6e 64 6c 3b | 0d 09 09 0d 09 63 6f 75 |<< endl;|.....cou|
|00000980| 74 20 3c 3c 20 22 44 65 | 6c 65 74 69 6e 67 20 53 |t << "De|leting S|
|00000990| 6d 69 74 68 22 20 3c 3c | 20 65 6e 64 6c 3b 0d 09 |mith" <<| endl;..|
|000009a0| 50 61 74 69 65 6e 74 73 | 2e 64 65 6c 65 74 65 52 |Patients|.deleteR|
|000009b0| 65 63 6f 72 64 28 29 3b | 0d 0d 09 63 6f 75 74 20 |ecord();|...cout |
|000009c0| 3c 3c 20 22 45 6e 74 69 | 72 65 20 64 61 74 61 62 |<< "Enti|re datab|
|000009d0| 61 73 65 20 77 69 74 68 | 6f 75 74 20 53 6d 69 74 |ase with|out Smit|
|000009e0| 68 22 20 3c 3c 20 65 6e | 64 6c 20 3c 3c 20 74 68 |h" << en|dl << th|
|000009f0| 65 44 42 20 3c 3c 20 65 | 6e 64 6c 3b 0d 09 0d 09 |eDB << e|ndl;....|
|00000a00| 63 6f 75 74 20 3c 3c 20 | 22 44 65 6c 65 74 69 6e |cout << |"Deletin|
|00000a10| 67 20 61 6c 6c 20 72 65 | 6d 61 69 6e 69 6e 67 20 |g all re|maining |
|00000a20| 72 65 63 6f 72 64 73 22 | 20 3c 3c 20 65 6e 64 6c |records"| << endl|
|00000a30| 3b 0d 09 50 61 74 69 65 | 6e 74 73 2e 64 65 6c 65 |;..Patie|nts.dele|
|00000a40| 74 65 41 6c 6c 28 29 3b | 0d 0d 09 63 6f 75 74 20 |teAll();|...cout |
|00000a50| 3c 3c 20 22 45 6e 74 69 | 72 65 20 64 61 74 61 62 |<< "Enti|re datab|
|00000a60| 61 73 65 20 20 2d 20 73 | 68 6f 75 6c 64 20 62 65 |ase - s|hould be|
|00000a70| 20 65 6d 70 74 79 22 20 | 3c 3c 20 65 6e 64 6c 20 | empty" |<< endl |
|00000a80| 3c 3c 20 74 68 65 44 42 | 20 3c 3c 20 65 6e 64 6c |<< theDB| << endl|
|00000a90| 20 3c 3c 20 65 6e 64 6c | 3b 0d 09 0d 09 50 61 74 | << endl|;....Pat|
|00000aa0| 69 65 6e 74 73 2e 41 64 | 64 54 65 73 74 44 61 74 |ients.Ad|dTestDat|
|00000ab0| 61 28 29 3b 20 20 0d 09 | 63 6f 75 74 20 3c 3c 20 |a(); ..|cout << |
|00000ac0| 22 54 65 73 74 69 6e 67 | 20 72 65 63 6f 72 64 20 |"Testing| record |
|00000ad0| 70 6f 73 69 74 69 6f 6e | 20 61 66 74 65 72 20 64 |position| after d|
|00000ae0| 65 6c 65 74 65 73 2c 20 | 77 69 74 68 20 61 6c 6c |eletes, |with all|
|00000af0| 20 72 65 63 73 20 26 20 | 6e 6f 20 73 6f 72 74 20 | recs & |no sort |
|00000b00| 6f 72 64 65 72 22 3c 3c | 20 65 6e 64 6c 3b 0d 09 |order"<<| endl;..|
|00000b10| 74 65 73 74 52 65 63 44 | 65 6c 65 74 65 73 28 29 |testRecD|eletes()|
|00000b20| 3b 0d 09 50 61 74 69 65 | 6e 74 73 2e 64 65 6c 65 |;..Patie|nts.dele|
|00000b30| 74 65 41 6c 6c 28 29 3b | 0d 0d 09 50 61 74 69 65 |teAll();|...Patie|
|00000b40| 6e 74 73 2e 41 64 64 54 | 65 73 74 44 61 74 61 28 |nts.AddT|estData(|
|00000b50| 29 3b 20 20 0d 09 63 6f | 75 74 20 3c 3c 20 22 54 |); ..co|ut << "T|
|00000b60| 65 73 74 20 61 67 61 69 | 6e 2c 20 77 69 74 68 20 |est agai|n, with |
|00000b70| 61 6c 6c 20 72 65 63 73 | 20 26 20 73 6f 72 74 20 |all recs| & sort |
|00000b80| 62 79 20 6f 74 68 65 72 | 6e 61 6d 65 22 3c 3c 20 |by other|name"<< |
|00000b90| 65 6e 64 6c 20 3c 3c 20 | 65 6e 64 6c 3b 0d 09 50 |endl << |endl;..P|
|00000ba0| 61 74 69 65 6e 74 73 2e | 73 65 74 53 6f 72 74 4f |atients.|setSortO|
|00000bb0| 72 64 65 72 28 50 61 74 | 69 65 6e 74 73 2e 4f 74 |rder(Pat|ients.Ot|
|00000bc0| 68 65 72 6e 61 6d 65 73 | 29 3b 0d 09 74 65 73 74 |hernames|);..test|
|00000bd0| 52 65 63 44 65 6c 65 74 | 65 73 28 29 3b 0d 09 50 |RecDelet|es();..P|
|00000be0| 61 74 69 65 6e 74 73 2e | 64 65 6c 65 74 65 41 6c |atients.|deleteAl|
|00000bf0| 6c 28 29 3b 0d 09 0d 09 | 50 61 74 69 65 6e 74 73 |l();....|Patients|
|00000c00| 2e 41 64 64 54 65 73 74 | 44 61 74 61 28 29 3b 20 |.AddTest|Data(); |
|00000c10| 20 0d 09 63 6f 75 74 20 | 3c 3c 20 22 54 65 73 74 | ..cout |<< "Test|
|00000c20| 20 61 67 61 69 6e 2c 20 | 77 69 74 68 20 61 6c 6c | again, |with all|
|00000c30| 20 72 65 63 73 20 26 20 | 6e 6f 6e 2d 69 6e 64 65 | recs & |non-inde|
|00000c40| 78 65 64 20 73 6f 72 74 | 20 62 79 20 72 65 76 65 |xed sort| by reve|
|00000c50| 72 73 65 20 6f 74 68 65 | 72 6e 61 6d 65 22 3c 3c |rse othe|rname"<<|
|00000c60| 20 65 6e 64 6c 20 3c 3c | 20 65 6e 64 6c 3b 0d 09 | endl <<| endl;..|
|00000c70| 50 61 74 69 65 6e 74 73 | 2e 73 65 74 52 65 76 65 |Patients|.setReve|
|00000c80| 72 73 65 53 6f 72 74 4f | 72 64 65 72 28 50 61 74 |rseSortO|rder(Pat|
|00000c90| 69 65 6e 74 73 2e 4f 74 | 68 65 72 6e 61 6d 65 73 |ients.Ot|hernames|
|00000ca0| 29 3b 0d 09 74 65 73 74 | 52 65 63 44 65 6c 65 74 |);..test|RecDelet|
|00000cb0| 65 73 28 29 3b 0d 09 50 | 61 74 69 65 6e 74 73 2e |es();..P|atients.|
|00000cc0| 64 65 6c 65 74 65 41 6c | 6c 28 29 3b 0d 09 0d 09 |deleteAl|l();....|
|00000cd0| 63 6f 75 74 20 3c 3c 20 | 22 64 6f 6e 65 22 20 3c |cout << |"done" <|
|00000ce0| 3c 20 65 6e 64 6c 3b 0d | 0d 09 72 65 74 75 72 6e |< endl;.|..return|
|00000cf0| 20 45 58 49 54 5f 53 55 | 43 43 45 53 53 3b 0d 7d | EXIT_SU|CCESS;.}|
|00000d00| 20 20 20 20 20 20 20 0d | 00 00 00 00 00 00 00 00 | .|........|
|00000d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000d90| 00 ff f5 f5 b0 f5 b0 f5 | b0 f5 f5 f5 f5 ff 00 00 |........|........|
|00000da0| 00 ff f5 f5 b0 b0 b0 f5 | b0 f5 f5 f5 f5 ff 00 00 |........|........|
|00000db0| 0c 6f 6f 66 74 73 74 30 | 39 2e 63 70 70 30 02 00 |.ooftst0|9.cpp0..|
|00000dc0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000dd0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 b0 1b 75 f7 00 00 | 00 00 00 00 01 9a 00 00 |....u...|........|
|00000e00| 0f ff ff ff ff f0 00 00 | 0f 0c 0c 0c 0c ff 00 00 |........|........|
|00000e10| 0f c0 c0 c0 c0 fc f0 00 | 0f 0c 0c 0c 0c ff ff 00 |........|........|
|00000e20| 0f c0 c0 c0 c0 c0 cf 00 | 0f 0c 0c 0c 0c 0c 0f 00 |........|........|
|00000e30| 0f c0 c0 c0 c0 c0 cf 00 | 0f 05 55 5c 55 5c 0f 00 |........|..U\U\..|
|00000e40| 0f c0 50 50 50 50 cf 00 | 0f 0c 5c 5c 5c 0c 0f 00 |..PPPP..|..\\\...|
|00000e50| 0f c0 55 50 50 c0 cf 00 | 0f 0c 5c 0c 5c 0c 0f 00 |..UPP...|..\.\...|
|00000e60| 0f c0 50 c0 50 50 cf 00 | 0f 05 55 0c 55 5c 0f 00 |..P.PP..|..U.U\..|
|00000e70| 0f c0 c0 c0 c0 c0 cf 00 | 0f ff ff ff ff ff ff 00 |........|........|
|00000e80| 00 00 00 04 00 01 00 01 | 00 00 00 48 00 09 4d 6f |........|...H..Mo|
|00000e90| 6e 61 63 6f 00 30 ff c8 | 2d 0a 00 08 a3 8a 00 00 |naco.0..|-.......|
|00000ea0| 02 56 d1 b0 02 49 03 88 | 02 56 02 56 00 00 00 06 |.V...I..|.V.V....|
|00000eb0| 00 04 00 58 00 04 01 cd | 02 6d 00 58 00 04 01 cd |...X....|.m.X....|
|00000ec0| 02 6d af 53 62 da 00 00 | 00 00 00 00 00 00 00 00 |.m.Sb...|........|
|00000ed0| 00 65 01 00 00 00 01 00 | 00 00 01 54 00 00 00 54 |.e......|...T...T|
|00000ee0| 00 00 00 46 02 49 08 98 | 2b 56 00 00 00 1c 00 46 |...F.I..|+V.....F|
|00000ef0| 00 01 4d 57 42 42 00 00 | 00 12 4d 50 53 52 00 00 |..MWBB..|..MPSR..|
|00000f00| 00 1e 03 f0 ff ff 00 00 | 00 00 00 00 00 00 03 ed |........|........|
|00000f10| ff ff 00 00 00 08 02 49 | 05 40 00 00 00 00 00 00 |.......I|.@......|
|00000f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+